// index.js
'use strict';

const { Application } = require('egg');
const app = new Application(__dirname);

// 从配置中获取端口
const port = app.config.cluster.listen.port || 7001;

app.listen(port, () => {
  console.log(`Server started at http://localhost:${port}`);
});

module.exports = app;